package com.qf.service.impl;

import com.qf.dao.SysUserMapper;
import com.qf.entity.SysPermission;
import com.qf.entity.SysRole;
import com.qf.entity.SysUser;
import com.qf.service.SysUserService;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 2019/9/23
 * Administrator
 * ssm0923
 * 面向对象面向君  不负代码不负卿
 */
@Service
public class SysUserServiceImpl implements SysUserService {
    @Resource
    private SysUserMapper sysUserMapper;
    @Override
    public SysUser login(String name) {
        //1.根据用户名查询用户信息
        SysUser sysUser = sysUserMapper.login(name);
        return sysUser;
    }

    @Override
    public List<SysPermission> findmenus(String roleid) {

        return sysUserMapper.findmenus(roleid);
    }

    @Override
    public List<SysPermission> findPermission(String roleid) {

        return sysUserMapper.findPermission(roleid);
    }


}
